package com.xcf.service.business.finance.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xcf.dao.DaoSupport;
import com.xcf.entity.Page;
import com.xcf.service.business.finance.AccountCheckService;
import com.xcf.util.PageData;

import cn.com.xcf.dao.mapper.TCheckIncomeMapper;
import cn.com.xcf.dao.mapper.TFinFeeCheckMapper;

@Service
public class AccountCheckServiceImpl implements AccountCheckService{

    private TFinFeeCheckMapper tfinFeeCheckMapper;
    public void setTfinFeeCheckMapper(TFinFeeCheckMapper tfinFeeCheckMapper) {
        this.tfinFeeCheckMapper = tfinFeeCheckMapper;
    }

	@Resource
	private DaoSupport dao;
	@Override
	public List<PageData> findAccountCheck(Object param, Map addition, Page page) throws Exception {
		page.getPd().putAll(addition);
	    return tfinFeeCheckMapper.queryFindAccountChecklistPage(page);
	}
	
	//public List<PageData> findAccountDetil(PageData pd) throws Exception {
	@Override
	 public List<PageData> findAccountDetil(Object param, Map addition, Page page) throws Exception {
			page.getPd().putAll(addition);
		    return tfinFeeCheckMapper.queryFindAccountDetillistPage(page);
		// TODO Auto-generated method stub
	}
	@Override
	public List<PageData> findCostDetil(Object param, Map addition, Page page) throws Exception {
		// TODO Auto-generated method stub
		//List<PageData> ls = (List<PageData>) dao.findForList("accountCheck.findCostDetil", pd);
		//return tfinFeeCheckMapper.queryFindCostDetillistPage(pd);
		page.getPd().putAll(addition);
	    return tfinFeeCheckMapper.queryFindCostDetillistPage(page);
	}
	@Override
	public void updateIncomeState(PageData pd) throws Exception {
		dao.update("accountCheck.editIncomeState", pd);
		
	}
	@Override
	public void updateCostState(PageData pd) throws Exception {
		dao.update("accountCheck.editCostState", pd);
	}

}
